<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib uri="/WEB-INF/taglib/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/taglib/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/taglib/struts-logic.tld" prefix="logic"%>

<div id="content">
	<h3>
		<bean:message key="student.start.links.tasks" />
	</h3>
	<html:form action="/student/task.do?method=update&state=unchecked">
		<table class="custom_table">
			<tr>
				<td><bean:message key="common.messages.discipline" /> :</td>
				<td><html:select name="taskForm" property="disciplineId">
						<html:option value="0">
							<bean:message key="common.messages.all" />
						</html:option>
						<html:optionsCollection name="taskForm" property="disciplineList"
							label="label" value="value" />
					</html:select>
				</td>
				<td><html:submit property="method" value="update" />
				</td>
			</tr>
			<tr>
				<td><html:link action="/student/task.do?method=list">
						<bean:message key="student.task_list.messages.all_tasks" />
					</html:link>
				</td>
				<td><h3>
						<bean:message key="student.task_list.messages.unchecked_tasks" />
					</h3>
				</td>
				<td></td>
			</tr>
		</table>
	</html:form>
	<table class="custom_table">
		<tr class="header_row">
			<th style="width: 150px; max-width: 150px;"><bean:message
					key="student.task_list.messages.name" />
			</th>
			<th style="width: 150px; max-width: 150px;"><bean:message
					key="common.messages.date" />
			</th>
			<th style="width: 150px; max-width: 150px;"><bean:message
					key="student.task_appointed_view.messages.max_upload" />
			</th>
			<th style="width: 150px; max-width: 150px;"><bean:message
					key="student.task_list.messages.task_attach" />
			</th>
		</tr>
		<logic:iterate name="taskForm" property="studentTaskList"
			id="studentTask" indexId="index">
			<tr>
				<td><html:link action="/student/task.do?method=view"
						indexed="true">
						<bean:write name="studentTask" property="task.taskTitle" />
					</html:link></td>
				<td><bean:write name="studentTask" property="task.creationDate" />
				</td>
				<td><bean:write name="studentTask" property="numberUpload" />/
					<bean:write name="studentTask" property="task.maxUpload" /></td>
				<td><html:link action="/student/task.do?method=download"
						indexed="true">
						<bean:write name="studentTask" property="taskAttach.name" />
					</html:link></td>
			</tr>
		</logic:iterate>
	</table>
</div>